package com.econ.powercloud.ems.domain;

import com.econ.powercloud.common.base.facade.util.JacksonUtil;
import com.econ.powercloud.ems.dal.entity.EmsPeakShiftDetail;
import com.econ.powercloud.ems.pojo.EmsPeakShiftDetailVO;
import com.econ.powercloud.ems.pojo.requestVO.EmsPeakShiftDetailRequestVO;

import java.util.List;

/**
 * @author zjr
 * @create 2021/7/22 下午2:23
 * @description
 */
public class EmsPeakShiftDetailDO {
    /**
     * 集合：实体类->VO类
     * @param emsPeakShiftDetails
     * @return
     */
    public static List<EmsPeakShiftDetailVO> entityListToVOList(List<EmsPeakShiftDetail> emsPeakShiftDetails){
        List<EmsPeakShiftDetailVO> emsPeakShiftDetailVOS = JacksonUtil.convertToList(emsPeakShiftDetails, EmsPeakShiftDetailVO.class);
        return emsPeakShiftDetailVOS;
    }

    /**
     * 集合：RequestVO类->实体类
     * @param emsPeakShiftDetailRequestVOS
     * @return
     */
    public static List<EmsPeakShiftDetail> requestVOListToEntityList(List<EmsPeakShiftDetailRequestVO> emsPeakShiftDetailRequestVOS){
        List<EmsPeakShiftDetail> emsPeakShiftDetailVOS = JacksonUtil.convertToList(emsPeakShiftDetailRequestVOS, EmsPeakShiftDetail.class);
        return emsPeakShiftDetailVOS;
    }
}
